<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>探测类型管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
	    	return false;
	    }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/mine/type/">探测类型列表</a></li>
		<shiro:hasPermission name="mine:type:edit"><li><a href="${ctx}/mine/type/form?sort=10">探测类型添加</a></li></shiro:hasPermission>
	</ul>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead><tr><th>键值</th><th>标签</th><th>颜色</th><shiro:hasPermission name="mine:type:edit"><th>操作</th></shiro:hasPermission></tr></thead>
		<tbody>
		<c:forEach items="${page.list}" var="dict">
			<tr>
				<td>${dict.value}</td>
				<td><a href="${ctx}/mine/type/form?id=${dict.id}">${dict.label}</a></td>
				<c:set value="${ fn:split(dict.remarks, ':') }" var="str1" />
				<td><div style="background-color:rgba(${str1[0] },${str1[1]},${str1[2]},${str1[3]/255 });width:25%;height:18px;"></div></td>
				<shiro:hasPermission name="sys:dict:edit"><td>
    				<a href="${ctx}/mine/type/form?id=${dict.id}">修改</a>
					<a href="${ctx}/mine/type/delete?id=${dict.id}&type=${dict.type}" onclick="return confirmx('确认要删除该字典吗？', this.href)">删除</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>